import router from "./index";
// cookies
import { getToken } from "@/utils/cookie";
// 全局前置守卫
router.beforeEach((to, from) => {
    // token不存在
    if(!getToken()) {
        if (to.name !== "Login") {
            return {
                name: "Login"
            }
        }
    }
    console.log(to, "to打印的值");
});
// 全局后置守卫
router.afterEach((to, from) => {

})
